/**
 * Created by abdulazizalonizi on 7/11/17.
 */
public class Task4 {
    public static void main (String[] args)
    {
    	int changeamnt = 532;
        int riyal50 = changeamnt/50 ;
        int riyal10 = changeamnt%50 / 10 ;
        int riyal5 = ((changeamnt%50)%10)/5 ;
        int riyal1 = (((changeamnt%50)%10)%5)/1 ;
        System.out.println("minimum number of bills = " + (riyal1+riyal5+riyal10+riyal50));
        System.out.println("number of 50 Riyal bills = "+riyal50);
        System.out.println("number of 10 Riyal bills = "+riyal10);
        System.out.println("number of 5 Riyal bills = "+riyal5);
        System.out.println("number of 1 Riyal bills = "+riyal1);   




    }
}
